import java.util.Random;

public class MethodTest3 {
    public MethodTest3() {
    }

    public static void main(String[] args) {
        String code = createCode(5);
        System.out.println(code);
    }

    public static String createCode(int n) {
        Random ra = new Random();
        String code = "";

        for(int i = 0; i < n; ++i) {
            int type = ra.nextInt(3);
            switch (type) {
                case 0:
                    code = code + ra.nextInt(9);
                    break;
                case 1:
                    char ch1 = (char)(ra.nextInt(26) + 65);
                    code = code + ch1;
                    break;
                case 2:
                    char ch2 = (char)(ra.nextInt(26) + 97);
                    code = code + ch2;
            }
        }

        return code;
    }
}
